<template>
  <div class="container">
    <data-view
      :propViewKey="strings.defaultIfBlank(propViewKey, 'device_plan')"
      :propViewForm="strings.defaultIfBlank(propViewForm, 'device/device_plan/device_plan_detail.vue')"
      :propIsTdesign="true"
      ref="dataView"
      :propAutoFetchData="false"
      :propFlowKey="propFlowKey"
      :propParam="{busType: propBusType}"
      :propViewFormTitle="cpPropViewFormTitle"
      :propHideColumns="cpPropHideColumns"
      @extra-button-click="extraButtonClick"
    />
  </div>
</template>

<script>
export default {
  desc: '设备-列表',
  props: ['propParameter', 'propFlowKey', 'propBusType', 'propViewForm', 'propViewKey'],
  mounted() {
    let wrapper = this.$newWrapper()
    wrapper.eq('bus_type', this.propBusType)
    this.$refs.dataView.setQueryWrapper(wrapper)
  },

  data() {
    return {}
  },
  computed: {
    // 弹框标题
    cpPropViewFormTitle() {
      return this.utils.getDictLabel(this.propBusType, this.constCommon.dictType.devicePlanBusType, null, false) + '详情'
    },
    // 隐藏列
    cpPropHideColumns() {
      return []
    },
  },
  components: {},
  methods: {
    extraButtonClick(para) {
    }
  }
}
</script>
